﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta http-equiv="Content-Language" content="zh-CN" />
	<title>购物 品牌展示 - 后台</title>
	<link type="text/css" href="{-$__DIR_ADM-}/css/base.css" rel="stylesheet" />
	<script type="text/javascript" src="{-$__DIR_ADM-}/js/jquery.js"></script>
	<script type="text/javascript" src="/xheditor/xheditor-1.1.6-zh-cn.min.js"></script>
</head>

<body>
<div class="sAll">

{-include file="`$__PHY_WEB``$__DIR_ADM`/block/top.admin.tpl"-}
{-php-}include(__PHY_WEB.__DIR_ADM."/block/menu.php");{-/php-}
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/menu.tpl" uL=$rNav-}

<div class="sL">
	<div class="sW main">
<!-- <main> -->
{- if $sMsg -}{- include file="`$__PHY_WEB``$__DIR_ADM`/block/message.tpl" -}{- /if -}

{- if 'list'==$sAction -}
<div class="sL list">
	<p>列表</p>
	<table>
		<tr class="capt">
			<td>ID</td>
			<td>国家</td>
			<td>品牌</td>
			<td>商品</td>
			<td>东西名称</td>
			<td>图片</td>
			<td><a href="?action=new">新建</a> </td>
		</tr>
{-section name=i loop=$rList-}
		<tr>
			<td>{-$rList[i].id|escape:html-}</td>
			<td>{-$rList[i].nation|escape:html-}</td>
			<td>{-$rList[i].brand|escape:html-}</td>
			<td>{-$rList[i].goods|escape:html-}</td>
			<td>{-$rList[i].title|escape:html-}</td>
			<td>{-if $rList[i].image_m-}<a href="{-$__DIR_STO-}{-$rList[i].image_m-}" target="_blank">点开看</a>{-else-}<i>empty</i>{-/if-}</td>
			<td><a href="?action=edit&id={-$rList[i].id-}">修改</a></td>
		</tr>
{-/section-}
		<tr class="capt">
			<td>ID</td>
			<td>国家</td>
			<td>品牌</td>
			<td>商品</td>
			<td>东西名称</td>
			<td>图片</td>
			<td><a href="?action=new">新建</a> </td>
		</tr>
	</table>
</div>
{- elseif 'edit'==$sAction -}
<div class="sL edit">
	<p>修改</p>
	<form method="post" action="?" enctype="multipart/form-data">
	<table>
		<input type="hidden" name="id" value="{-$rOne.id|escape:html-}" />
		<tr>
			<td class="indc">国家：</td>
			<td><select name="nation">
				<option value="mala"{-if 'mala'==$rOne.nation-} selected="selected"{-/if-}>马来西亚</option>
				<option value="singapore"{-if 'singapore'==$rOne.nation-} selected="selected"{-/if-}>新加坡</option>
				<option value="thailand"{-if 'thailand'==$rOne.nation-} selected="selected"{-/if-}>泰国</option>
			</select></td>
			<td>图片：</td>
		</tr>
		<tr>
			<td class="indc">品牌：</td>
			<td><input type="text" name="brand" value="{-$rOne.brand|escape:html-}" size="50" /></td>
			<td rowspan="4" valign="top">
				<a href="{-$__DIR_STO-}{-$rOne.image_m-}" target="_blank"><img src="{-$__DIR_STO-}{-$rOne.image_m-}" width="100" height="80" /></a>
				<br /><input type="hidden" name="image_m" value="{-$rOne.image_m|escape:html-}" />
				上传：<input type="file" name="file_m" />
			</td>
		</tr>
		<tr>
			<td class="indc">商品：</td>
			<td><input type="text" name="goods" value="{-$rOne.goods|escape:html-}" size="50" /></td>
		</tr>
		<tr>
			<td class="indc">东西名称：</td>
			<td><input type="text" name="title" value="{-$rOne.title|escape:html-}" size="50" /></td>
		</tr>
		<tr>
			<td class="indc">描述文章：</td>
			<td><textarea name="description" class="xheditor-simple" rows="16" cols="60">{-$rOne.description|escape:html-}</textarea></td>
		</tr>
		<tr>
			<td colspan="3" align="center">
				<input type="submit" name="action" value="update" /> &nbsp;
				<input type="submit" name="action" value="cancel" />
			</td>
		</tr>
	</table><br />
</div>
</div>
{- elseif 'new'==$sAction -}
<div class="sL edit">
	<p>新增</p>
	<form method="post" action="?" enctype="multipart/form-data">
	<table>
		<tr>
			<td class="indc">国家：</td>
			<td><select name="nation">
				<option value="mala"{-if 'mala'==$rOne.nation-} selected="selected"{-/if-}>马来西亚</option>
				<option value="singapore"{-if 'singapore'==$rOne.nation-} selected="selected"{-/if-}>新加坡</option>
				<option value="thailand"{-if 'thailand'==$rOne.nation-} selected="selected"{-/if-}>泰国</option>
			</select></td>
		</tr>
		<tr>
			<td class="indc">品牌：</td>
			<td><input type="text" name="brand" value="{-$rOne.brand|escape:html-}" size="50" /></td>
		</tr>
		<tr>
			<td class="indc">商品：</td>
			<td><input type="text" name="goods" value="{-$rOne.goods|escape:html-}" size="50" /></td>
		</tr>
		<tr>
			<td class="indc">东西名称：</td>
			<td><input type="text" name="title" value="{-$rOne.title|escape:html-}" size="50" /></td>
		</tr>
		<tr>
			<td class="indc">描述文章：</td>
			<td><textarea name="description" class="xheditor-simple" rows="16" cols="60">{-$rOne.description|escape:html-}</textarea></td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="action" value="add" />
				<input type="submit" name="action" value="cancel" />
			</td>
		</tr>
	</table>
	</form>
</div>
{- elseif 'addimage'==$sAction -}

{- else -}
sth wrong: no $sAction.
{- /if -}

<!-- </main> -->
	</div>
</div>

{- include file="`$__PHY_WEB``$__DIR_ADM`/block/tail.admin.tpl" -}

</div><!-- end all -->
</body>
</html>
